<?php
/**
 * Created by swagger_zxd.
 * User: zxd
 * Date: 2017/11/21
 * Time: 16:46
 */

namespace App\Http\Requests\Admin\Notice;


use App\Models\FcAdminModel;
use Illuminate\Foundation\Http\FormRequest;

class NoticeEditRequest extends FormRequest
{
    use FcAdminModel;

    /**
     * 定义一个权限
     * @return bool
     */
    public function authorize()
    {
        return true;
    }


    /**
     * 验证规则
     * @return array
     */
    public function rules()
    {
        return [
            'content'=>'required',
            'times'=>'required|numeric',
        ];
    }


    /**
     * 提示消息
     * @return array
     */
    public function messages()
    {
        return [
            'content.required'=>'请填写通知内容',
            'times.required'=>'请填写通知次数',
            'times.numeric'=>'通知次数必须是数值',
        ];
    }
}